#include <fstream>
#include <time.h>
#include <iostream>

using namespace std;

int main(int argc, char **argv)
{
  srand(time(NULL));

  long n = atol(argv[1]);

  const char *filename = argv[2];

  ofstream file(filename);

  for (long i = 0; i < n; i++) {
    file << rand() << endl;
  }
}
